package com.flyco.modules.stm.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyco.modules.stm.entity.StmStoreSalesRelation;
import com.flyco.modules.stm.mapper.StmStoreSalesRelationMapper;
import com.flyco.modules.stm.service.IStmStoreSalesRelationService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 门店店员关联
 * @Author: flyco
 * @Date:   2020-09-23
 * @Version: V1.0
 */
@DS("store")
@Service
public class StmStoreSalesRelationServiceImpl extends ServiceImpl<StmStoreSalesRelationMapper, StmStoreSalesRelation> implements IStmStoreSalesRelationService {
	
	@Autowired
	private StmStoreSalesRelationMapper stmStoreSalesRelationMapper;

	@Override
	public boolean deleteByMainId(Long mainId) {
		return stmStoreSalesRelationMapper.deleteByMainId(mainId);
	}

	@Override
	public List<StmStoreSalesRelation> selectByMainId(Long mainId) {
		return stmStoreSalesRelationMapper.selectByMainId(mainId);
	}


	@Override
	public Page<StmStoreSalesRelation> getStoreSalesRelationPage(Page<StmStoreSalesRelation> page, Wrapper<StmStoreSalesRelation> wrapper) {
		return page.setRecords(stmStoreSalesRelationMapper.getStoreSalesRelationPage(page, wrapper));
	}

}
